package com.gitee.jmash.rbac.client.shiro.authz;

import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.Permission;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;

public abstract class JmashBaseAuthorizingRealm extends AuthorizingRealm {


  @Override
  public AuthorizationInfo getAuthorizationInfo(PrincipalCollection principals) {
    return super.getAuthorizationInfo(principals);
  }


  public boolean isPermitted(AuthorizationInfo info, String permission) {
    Permission p = getPermissionResolver().resolvePermission(permission);
    return isPermitted(p, info);
  }

}
